package com.springboot.demo.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.servlet.ModelAndView;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @author wubc683
 * @desc
 * @date 2021-09-01 9:42
 */
@Controller
@Api(tags = "页面接口")
public class PageController {
//    @Autowired
//    private WebSocketServer webSocketServer;

    @GetMapping(value = "/test")
    @ApiOperation(value = "测试页面")
    @ApiOperationSupport(order = 1)
    public String test() {
        return "test";
    }

    @GetMapping("/rabbit-js")
    public String rabbit() {
        return "rabbit-js";
    }

    @GetMapping("/ws")
    public ModelAndView ws() {
        ModelAndView mav=new ModelAndView("/ws");
        return mav;
    }

    @GetMapping("/webSocket")
    public ModelAndView socket() {
        ModelAndView mav=new ModelAndView("/webSocket");
        return mav;
    }

    @GetMapping(value = "/mq")
    @ApiOperation(value = "mq测试页面")
    @ApiOperationSupport(order = 2)
    public String mqtest() {
        return "mq";
    }


    @GetMapping(value = {"/", "/login"})
    @ApiOperation(value = "登录页面")
    @ApiOperationSupport(order = 10)
    public String login() {
        return "login";
    }

    @GetMapping("/index")
    @ApiOperation("主页面")
    @ApiOperationSupport(order = 20)
    public String index() {
        return "index";
    }

//    @GetMapping("/common/register")
//    @ApiOperation("注册页面")
//    @ApiOperationSupport(order = 30)
//    public String register() {
//        return "register";
//    }
//
//    @GetMapping("/sys/relevance")
//    @ApiOperation("关联用户管理页面")
//    @ApiOperationSupport(order = 40)
//    public String relevance() {
//        return "relevance";
//    }
//
//    @GetMapping("/sys/auth")
//    @ApiOperation("角色权限管理页面")
//    @ApiOperationSupport(order = 50)
//    public String auth() {
//        return "authority";
//    }
//
//    @GetMapping("/inbox")
//    @ApiOperation("收件箱管理页面")
//    @ApiOperationSupport(order = 60)
//    public String inbox() {
//        return "inbox";
//    }
//
//    @GetMapping("/device/config/panel")
//    @ApiOperation("设备组态仪表盘页面")
//    @ApiOperationSupport(order = 70)
//    public String devPanel() {
//        return "devicePanel";
//    }
//
//    @GetMapping("/device/config/manage")
//    @ApiOperation("设备组态管理页面")
//    @ApiOperationSupport(order = 80)
//    public String devConfig() {
//        return "deviceConfig";
//    }
//
//    @GetMapping("/device/config/scene")
//    @ApiOperation("设备组态场景页面")
//    @ApiOperationSupport(order = 90)
//    public String devConfigScene() {
//        return "deviceConfigScene";
//    }
//
//    @GetMapping("/device/config/details")
//    @ApiOperation("设备组态详情页面")
//    @ApiOperationSupport(order = 100)
//    public String devConfigDetails() {
//        return "deviceConfigDetails";
//    }
//
//    @GetMapping("/device/group")
//    @ApiOperation("设备群管理页面")
//    @ApiOperationSupport(order = 110)
//    public String devGroup() {
//        return "deviceGroup";
//    }
//
//    @GetMapping("/device/owner")
//    @ApiOperation("我的设备页面")
//    @ApiOperationSupport(order = 120)
//    public String devOwner() {
//        return "deviceOwner";
//    }
//
//    @GetMapping("/device/alarm")
//    @ApiOperation("设备报警管理页面")
//    @ApiOperationSupport(order = 130)
//    public String devAlarm() {
//        return "deviceAlarm";
//    }
}
